package com.itheima.project_cloth.mapper;

import com.itheima.project_cloth.pojo.Consumer;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ConsumerMapper {

    @Select("select * from tb_consumer where vip_status = #{vipStatus}")
    List<Consumer> list(Integer vipStatus);

    //新增消费者信息
   // @Insert("insert into tb_consumer (name, phone) values (#{name},#{phone})")
    void insert(Consumer consumer);

    @Delete("delete from tb_consumer where id = #{id}")
    void delete(Integer id);

    @Select("select * from tb_consumer where name = #{name}")
    Consumer select(String name);

    @Select("select * from tb_consumer where vip_status = #{status}")
    List<Consumer> selectVip(Integer status);


    void deleteIds(List<Integer> ids);

    void UpdateConsumerById(Consumer consumer);
}
